﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Pharmacy
{
    public partial class Form1 : Form
    {
        Avtoriza a = new Avtoriza();
        public Form1()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            a.MdiParent = this;
            a.Show();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            if (a.C)
            {
                if (a.A)
                {
                    MainForm mf = new MainForm();
                    mf.MdiParent = this;
                    mf.Show();
                    timer2.Enabled = false;
                }
                else
                {
                    this.Close();
                }
            }
        }
    }
}
